package com.example;

public class Random {

    public static String rom(){
        StringBuilder id = new StringBuilder();
//        for (int i = 0; i < 3; i++) {
            id.append("ktp");
//        }
        for (int i = 0; i < 6; i++) {

                id.append((int)(Math.random() * 10));

        }
        return String.valueOf(id);
    }
    public static String random() {
        StringBuilder sb = new StringBuilder();
        java.util.Random random = new java.util.Random();
        int count = 0;

        while (count < 6) {
            char letter = (char) (random.nextInt(26) + 'A');
            if (sb.indexOf(String.valueOf(letter)) == -1) {
                sb.append(letter);
                count++;
            }
        }

        return sb.toString();
    }
}
